package android.controllers;

import android.activities.CourseAddActivity;
import android.activities.R;
import android.tools.Tools;
import android.util.Log;
import android.view.View;

public class CourseAddController implements View.OnClickListener {

	private CourseAddActivity _view = null;

	public CourseAddController(CourseAddActivity a) {
		this._view = a;
	}

	public void onClick(View v) {
		Log.i("CourseAddController", "OnClick - START ");

		switch (Tools.getInstance().classNameToInt(v.getClass().toString())) {
        // Clic sur le bouton "Ajouter une prise"
        case Tools.RELATIVELAYOUT:
            Log.d("PC::onClick", "Tools.RELATIVELAYOUT");
            ((CourseAddActivity) v.getContext()).flipNext();
            break;

        // Clic sur les boutons d'actions (les icones)
        case Tools.BUTTON:
            Log.d("PC::onClick", "Tools.BUTTON");
            int status = 0; 
            
            switch (v.getId()) {
            case 1:
                break;

            case 2:
                break;

            case R.id.course_add_relative_manage_step:
                ((CourseAddActivity) v.getContext()).flipNext();
                break;
                
            case R.id.course_add_relative_manage_course:
                ((CourseAddActivity) v.getContext()).flipPrevious();
                break;

            default:
                Log.d("PC::onClick", "DEFAULT Tools.BUTTON");
                break;
            }

            break;

        default:
            Log.d("PC::onClick", "DEFAULT");
            break;
        }

        Log.d("PC::onClick", "END");
    
	}

	
}